export const createChunck = (file, index, chunkSize) => {
    return new Promise(resolve => {
        const start = index * chunkSize;
        const end = start + chunkSize;
        // const spark = new SparkMD5.ArrayBuffer();
        const fileReader = new FileReader();
        fileReader.onload = (e) => {
            // spark.append(e.target.result);
            resolve({
                start,
                end,
                index,
                hash: e.target.result
                // hash: spark.end()
            })
        }
        fileReader.readAsArrayBuffer(file.slice(start, end))
    })
}